
/* =========================
   RESET E BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    color: #333;
    line-height: 1.6;
}

/* =========================
   HEADER
========================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #0d47a1;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: white;
}

.nav.desktop {
    display: flex;
    gap: 1rem;
}

.nav.desktop a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.nav.desktop a:hover { color: #42a5f5; }

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
}

.nav.mobile {
    display: none;
    position: absolute;
    top: 70px;
    right: 0;
    background-color: #0d47a1;
    flex-direction: column;
    width: 200px;
    padding: 1rem;
    border-radius: 0 0 10px 10px;
    z-index: 999;
}

.nav.mobile a {
    color: white;
    padding: 10px 0;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.nav.mobile a:hover { color: #42a5f5; }
.nav.mobile.active  { display: flex; }

.hero {
    position: relative;
    height: 100vh;            /* occupa tutta l'altezza dello schermo */
    min-height: 600px;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Poppins', Arial, sans-serif;
    text-align: center;
}

/* --- SLIDESHOW DI SFONDO --- */
.hero-slideshow {
    position: absolute;
    inset: 0;        /* riempie tutto il genitore (top:0; right:0; bottom:0; left:0) */
    z-index: 1;
}

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: slideshow 18s infinite;
}

/* IMMAGINI: cambia i nomi file con i tuoi.
   Se ne hai solo una, ripeti la stessa 3 volte. */
.slide-1 { background-image: url('Schermata\ 2025-12-22\ alle\ 18.12.38\ Media\ copia.jpeg'); animation-delay: 0s; }
.slide-2 { background-image: url('2cef314c-1456-49ec-8a3d-85453a6bc1ad.png'); animation-delay: 6s; }
.slide-3 { background-image: url('WhatsApp\ Image\ 2026-05-05\ at\ 16.39.23.jpeg'); animation-delay: 12s; }

/* Animazione: ogni slide visibile per 6 secondi su 18 totali, con dissolvenza */
@keyframes slideshow {
    0%   { opacity: 0; transform: scale(1.1); }
    5%   { opacity: 1; transform: scale(1.05); }
    33%  { opacity: 1; transform: scale(1); }
    38%  { opacity: 0; transform: scale(1); }
    100% { opacity: 0; } 
}

/* --- OVERLAY SCURO --- */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
                rgba(0, 0, 0, 0.85),
                rgba(0, 0, 0, 0.65),
                rgba(0, 0, 0, 0.7));
    z-index: 2;
}

/* --- CONTENUTO --- */
.hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    padding: 0 2rem;
    animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.5rem, 7vw, 5.5rem);   /* si adatta da mobile a desktop */
    font-weight: 900;
    line-height: 1.1;
    margin: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.hero-accent {
    background: linear-gradient(45deg, #5bdcff, #039eff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin: 25px 0 40px;
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    opacity: 0.95;
}

/* --- BOTTONI --- */
.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary-hero {
    background: linear-gradient(45deg, #25d366, #128c7e);  /* verde WhatsApp */
    color: white;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.btn-primary-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6);
}

.btn-outline-hero {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: 2px solid white;
}

.btn-outline-hero:hover {
    background: white;
    color: #0d47a1;
    transform: translateY(-3px);
}

/* --- INDICATORE SCROLL --- */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: white;
    font-size: 2rem;
    text-decoration: none;
    animation: bounce 2s infinite;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.scroll-indicator:hover {
    opacity: 1;
    color: white;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(15px); }
}

/* --- RESPONSIVE PER MOBILE --- */
@media (max-width: 600px) {
    .hero {
        min-height: 500px;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-hero {
        justify-content: center;
        width: 100%;
    }
}

/* =========================
   SEZIONI
========================= */
.section {
    padding: 3rem 2rem;
    max-width: 1100px;
    margin: auto;
}

.section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

#chisiamo.light, #prenotazione {
    background-color: #ffffff;
    width: 100%;
    padding: 60px 20px;
}

/* =========================
   CARDS SERVIZI
========================= */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* =========================
   CALCOLATORE PATENTE
========================= */
.calc-box {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.calc-intro {
    margin-bottom: 20px;
    color: #555;
}

.calc-box label {
    display: block;
    text-align: left;
    font-weight: 500;
    margin-bottom: 5px;
}

.calc-box input[type="number"] {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ccc;
    margin-bottom: 15px;
    font-size: 15px;
}

.calc-box input[type="number"]:focus {
    border-color: #1976d2;
    box-shadow: 0 0 8px rgba(25,118,210,0.3);
    outline: none;
}

#btnCalcola {
    background: #1976d2;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

#btnCalcola:hover {
    background: #0d47a1;
    transform: scale(1.05);
}

.risultato {
    margin-top: 20px;
    text-align: left;
}

.risultato.ok {
    background: #e8f5e9;
    color: #1b5e20;
    padding: 15px;
    border-radius: 12px;
    border-left: 5px solid #43a047;
}

.risultato.ko {
    background: #ffebee;
    color: #b71c1c;
    padding: 15px;
    border-radius: 12px;
    border-left: 5px solid #e53935;
}

.risultato ul {
    margin-top: 10px;
    padding-left: 20px;
}

/* =========================
   CHI SIAMO
========================= */
.chi-siamo-container {
    background-color: #f7f7f7;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

.chi-siamo-img {
    flex: 1 1 300px;
    max-width: 400px;
    border-radius: 15px;
    display: block;
}

.chi-siamo-container p {
    flex: 2 1 400px;
    text-align: justify;
}

/* =========================
   PRENOTAZIONE
========================= */
#prenotazione {
    display: flex;
    justify-content: center;
}

#prenotazione .card {
    max-width: 550px;
    width: 100%;
    background: #fff;
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#prenotazione .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 70px rgba(0,0,0,0.3);
}

#prenotazione h1 {
    color: #1976d2;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

#prenotazione .info {
    background: #e6f0ff;
    color: #333;
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 25px;
    font-size: 14px;
}

#prenotazione label {
    display: block;
    font-weight: 500;
    margin-top: 15px;
    text-align: left;
}

#prenotazione input,
#prenotazione select {
    width: 100%;
    padding: 14px;
    margin-top: 5px;
    border-radius: 12px;
    border: 1px solid #ccc;
    font-size: 15px;
    transition: 0.3s;
}

#prenotazione input:focus,
#prenotazione select:focus {
    border-color: #1976d2;
    box-shadow: 0 0 8px rgba(25,118,210,0.3);
    outline: none;
}

/* Validazione live */
#prenotazione input.valid,
#prenotazione select.valid {
    border-color: #43a047;
    background: #f1f8e9;
}

#prenotazione input.invalid,
#prenotazione select.invalid {
    border-color: #e53935;
    background: #ffebee;
}

#prenotazione .msg {
    display: block;
    text-align: left;
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}

#prenotazione .msg.ok { color: #43a047; }
#prenotazione .msg.ko { color: #e53935; }

#prenotazione button {
    width: 100%;
    margin-top: 25px;
    padding: 16px;
    background: linear-gradient(45deg, #1976d2, #42a5f5);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

#prenotazione button:hover {
    background: linear-gradient(45deg, #42a5f5, #1976d2);
    transform: scale(1.03);
}

#prenotazione .captcha {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 18px;
    font-size: 14px;
}

#prenotazione .captcha input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: #1976d2;
}

#prenotazione .footer {
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-top: 20px;
    background: transparent;
    padding: 0;
}

/* =========================
   ORARI
========================= */
.orari {
    background-color: #f7f7f7;
    padding: 50px 0;
    text-align: center;
}

.orari .container {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
}

.orari h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: #333;
}

.orari table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
}

.orari th {
    background-color: #0d47a1;
    color: white;
    padding: 12px 15px;
    font-size: 18px;
    text-transform: uppercase;
}

.orari td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    font-size: 16px;
    color: #555;
}

.orari tr:nth-child(even) td { background-color: #f2f2f2; }
.orari tr:hover td           { background-color: #9a9e9f; }

.orari td.chiuso {
    color: red;
    font-weight: bold;
}

/* =========================
   CONTATTI
========================= */
.contact-box {
    background-color: #1976d2;
    color: white;
    padding: 2rem;
    max-width: 400px;
    margin: auto;
    border-radius: 15px;
    text-align: center;
}

.contact-box a {
    color: white;
    text-decoration: underline;
}

/* =========================
   FOOTER
========================= */
.footer {
    background-color: #0d47a1;
    color: white;
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
}

/* =========================
   BOTTONE TORNA SU
========================= */
#btnTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: 0.4s;
    z-index: 1000;
}

#btnTop.visibile {
    opacity: 1;
    visibility: visible;
}

#btnTop:hover {
    background: #0d47a1;
    transform: translateY(-3px);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 600px) {
    #prenotazione .card,
    #chisiamo .chi-siamo-container {
        padding: 25px;
        flex-direction: column;
    }
    #prenotazione h1 { font-size: 1.5rem; }
}

@media (max-width: 768px) {
    .nav.desktop { display: none; }
    .hamburger   { display: flex; }
}

/* DROPDOWN MENU */
.dropdown { position: relative; }
.dropdown-toggle { cursor: pointer; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; left: 0;
    background: #0d47a1;
    min-width: 200px;
    border-radius: 0 0 10px 10px;
    padding: 10px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
}
.dropdown-menu a:hover { background: #1976d2; }
.dropdown:hover .dropdown-menu { display: block; }

/* CARD LINK HOME */
.card-link { text-decoration: none; color: inherit; display: block; transition: 0.3s; }
.card-link:hover { transform: translateY(-5px); }

/* PAGE HERO MINI con slideshow */
.page-hero {
    position: relative;
    height: 50vh;
    min-height: 350px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 70px;
    color: white;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}
.page-hero-slideshow { position: absolute; inset: 0; z-index: 1; }
.page-hero .slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0;
    animation: slideshow 18s infinite;
}
.page-hero-content {
    position: relative; z-index: 3;
    padding: 0 20px;
    animation: fadeInUp 1s ease-out;
}
.page-hero h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 900;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.page-hero p {
    font-size: 1.1rem;
    margin-top: 15px;
    opacity: 0.95;
}

/* PATENTE CARD */
.patente-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    height: 100%;
    transition: 0.3s;
}
.patente-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.15); }
.patente-header {
    padding: 25px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.patente-header h3 { margin: 0; font-size: 1.5rem; }
.eta-badge {
    background: rgba(255,255,255,0.25);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}
.patente-body { padding: 25px; }
.patente-body h4 {
    color: #0d47a1;
    margin: 20px 0 10px;
    font-size: 1.05rem;
    font-family: 'Poppins', sans-serif;
}
.patente-body ul { padding-left: 20px; color: #555; line-height: 1.8; }

/* Gradienti header per categoria */
.patente-header.am { background: linear-gradient(135deg, #00b894, #00cec9); }
.patente-header.a1 { background: linear-gradient(135deg, #0984e3, #74b9ff); }
.patente-header.a2 { background: linear-gradient(135deg, #6c5ce7, #a29bfe); }
.patente-header.a  { background: linear-gradient(135deg, #d63031, #ff7675); }
.patente-header.b1-cat { background: linear-gradient(135deg, #fdcb6e, #ffeaa7); color: #333; }
.patente-header.b-cat { background: linear-gradient(135deg, #0984e3, #00b8d4); }
.patente-header.b96 { background: linear-gradient(135deg, #00b894, #55efc4); }
.patente-header.guidasicura { background: linear-gradient(135deg, #e17055, #fab1a0); }
.patente-header.c1 { background: linear-gradient(135deg, #e67e22, #f39c12); }
.patente-header.c { background: linear-gradient(135deg, #c0392b, #e74c3c); }
.patente-header.d1 { background: linear-gradient(135deg, #16a085, #1abc9c); }
.patente-header.d { background: linear-gradient(135deg, #2c3e50, #34495e); }
.patente-header.cqc { background: linear-gradient(135deg, #8e44ad, #9b59b6); }
.patente-header.rinnovo { background: linear-gradient(135deg, #27ae60, #2ecc71); }
.patente-header.duplicato { background: linear-gradient(135deg, #34495e, #7f8c8d); }
.patente-header.novita { background: linear-gradient(135deg, #f39c12, #e67e22); }

/* INFO EXTRA & NEWS */
.info-extra { background: #f7f7f7; }
.info-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    height: 100%;
}
.info-card h4 { color: #0d47a1; margin-bottom: 10px; }
.news-list {
    list-style: none;
    padding: 0;
    max-width: 700px;
    margin: 20px auto;
}
.news-list li {
    background: white;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 10px;
    border-left: 4px solid #1976d2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* CTA */
.cta-section {
    background: linear-gradient(135deg, #0d47a1, #1976d2);
    color: white;
    text-align: center;
    padding: 60px 20px;
}
.cta-section h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
}
.cta-section p { font-size: 1.1rem; margin-bottom: 25px; opacity: 0.95; }

@media (max-width: 768px) {
    .dropdown.open .dropdown-menu { display: block; position: static; }
}
